|
|
> #declare f_mwaves = function(x,y,z,phse) {
> 0.5*(1+cos(2*pi*(phse+sqrt(x*x+y*y+z*z))))
> }
>
> function{
> (f_mwaves((x-3)/3,(y-2)/5,(z+1)/4,5*clock) +
> f_mwaves((x+1)/4,(y+1)/6,(z-2)/7,6*clock) +
> f_mwaves((x-1)/5,(y-1)/4,(z+2)/6,7*clock)) / 3
> }
Sorry, just looked over it again and saw that i
optimized it for a use as pigment-function.
For an isosurface something like this would be better:
#declare f_mwaves = function(x,y,z,phse) {
cos(2*pi*(phse+sqrt(x*x+y*y+z*z)))
}
function{
y -
(f_mwaves((x-3)/3, (y-2)/5, (z+1)/4, 5*clock) +
f_mwaves((x+1)/4, (y+1)/6, (z-2)/7, 6*clock) +
f_mwaves((x-1)/5, (y-1)/4, (z+2)/6, 7*clock)) / 3
}
Thies
Post a reply to this message
|
|